home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
grafik
/
superviewel
/
superviewlibrary
/
docs
/
svsupport-docs
/
controlpad.doc
next >
Wrap
Text File
|
1995-08-02
|
4KB
|
90 lines
The ControlPad-FileFormat V6.4 (2.4.95)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Many SVObjects, SVDrivers and SVOperators have to handle globally set
preferences, which might also have to be handled and/or modified by
custom programs or SuperViewPrefs.
To prevent multiple different ways of storing these preferences
data, I introduced a common standard FileFormat for such configuration
files: The ControlPad-FileFormat
(please read the notes under "Style Guide" below).
- To allow easy reading and understanding of these Files, these are
stored in plain ASCII
- To prevent people from learning just another technique of configuring
files, these are constructed just like a kind of "Tooltype-Lists"
- a single ControlPad takes a full line of the File
and looks like that : <Name>=<Content> or <Keyword>
Content and Name may contain any ASCII characters except "=", because
the first "=", which is found, is used to separate the Name from the
Content in the line. A Keyword is anything, which does not contain
a "=" somwhere, but is not a comment.
- So all other special characters are possible (although you should
not make too much use of them for ergonomical reasons).
- it is supported to write as much comments to the files, as wished.
A comment line has to begin with "/" or ";" in its first column.
A totally blank line fits to the same category as "/" or ";" lines.
Additional Notes
~~~~~~~~~~~~~~~~
* Note, that comments are totally ignored by the Library functions, when
reading ControlPad-Files, and writing of comments is not supported.
So do not add too much comments to your files, but on the other hand,
explain all of the Switches (and their default values) inside the
Doc-Files of your program to prevent a lack of information !
* The SVSUP_FindControlPad() function is case-sensitive, so if nothing
else is specified, the ControlPad-entries are always also
case-sensitive. Case-Insensitive functions already have been added
(SVSUP_FindControlPadNoCase()) but are not used widely yet.
"Style Guide"
~~~~~~~~~~~~~
Common "style guide" rules (PLEASE NOTE) :
- ControlPads should be located in "ENV:superview-library/"
and have the plain name of the SVDriver/SVObject/... plus
".controlpad" as extension.
For Example a ControlPad for JPEG.svobject should be
named "ENV:superview-library/JPEG.controlpad".
- for boolean entries use <YES|NO> choices, not <TRUE/FALSE>
or just set single Keywords like "USE_..."
- use pregnant and verbose names for multiple-choices, like
<HUFF|LWZ|ENTROPY>, not <1|2|3>
- use short names and statements, not long and complicated ones :
"ColorDepth=24" instead of "Number_of_Colors=16.7_million"
Examples
~~~~~~~~
In "Programmers/Example_Tools/ControlPad" you find some example
Source, which deals with ControlPads and should explain anything
you need to know about these.
In addition to the supplied example Files there and to the SourceCode,
here are some examples of ControlPad-Files (---[...]--- marks the
beginning and the end: both lines are not part of the file):
------------------------------ (1) JPEG.controlpad -------------------------
/* Set the Input/Output ColorDepth for JPEG encoding/decoding (8/24) : */
COLORDEPTH=8
/* Compress highly, but still with a good quality */
QUANTIZATION=75
----------------------------------------------------------------------------
------------------------------ (2) LIBRARY.controlpad ----------------------
// Set Default SVDriver
DEFAULTSVDRIVER=AGA.svdriver
// Support any Datatypes
ANYDATATYPES
----------------------------------------------------------------------------
------------------------------ (3) 24BitToHam.controlpad -------------------
; Set dithering mode
DITHERMODE=HAM6_QUICK
----------------------------------------------------------------------------